<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use function Hyperf\Support\env;

return [
    'default' => [
        'driver' => env('DB_DRIVER', 'mysql'),
        'read' => [
            'host' => ['82.157.199.227'],
        ],
        'write' => [
            'host' => ['192.168.0.220'],
        ],
        'sticky'    => true,
        'database' => env('DB_DATABASE', 'hyperf'),
        'port' => env('DB_PORT', 3306),
        'username' => env('DB_USERNAME', 'hyperf'),
        'password' => env('DB_PASSWORD', 'zXLWNrtsKt7LWcJm'),
        'charset' => env('DB_CHARSET', 'utf8mb4'),
        'collation' => env('DB_COLLATION', 'utf8mb4_general_ci'),
        'prefix' => env('DB_PREFIX', ''),
        'pool' => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout' => 3.0,
            'heartbeat' => -1,
            'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
    ],
];

//docker run --name mysql57 -e MYSQL_ROOT_PASSWORD=1234567 -d -p 3306:3306 -v /e/mysql57/conf:/etc/mysql/conf.d -v /e/mysql57/data:/var/lib/mysql mysql:5.7

//net stop mysql 关闭本地数据库


//DB_DRIVER=mysql
//DB_HOST=localhost
//DB_PORT=3306
//DB_DATABASE=hyperf
//DB_USERNAME=root
//DB_PASSWORD=
//DB_CHARSET=utf8mb4
//DB_COLLATION=utf8mb4_unicode_ci
//DB_PREFIX=